// HSS.Forms.ShowFileProperties.cs
// ----------------------------------------------------------------------------
// Licensed under the MIT license
// http://www.opensource.org/licenses/mit-license.html
// ----------------------------------------------------------------------------
// HighSpeed-Solutions, LLC
// Copyright (c) 2001-2010
// ----------------------------------------------------------------------------
// File:       ShowFileProperties.cs
// Author:     HSS\gbanta
// Created:    08/12/2010
// Modified:   12/04/2010
// ----------------------------------------------------------------------------
namespace HSS.Forms
{
	#region Using Directives
	using System;
	using System.Runtime.InteropServices;
	#endregion

	#region ShowFileProperties
	/// <summary>
	/// Shows the Windows Explorer Properties dialog for a given file
	/// </summary>
	public static class ShowFileProperties
	{

		/// <summary>
		/// Shows the Windows Explorer Properties dialog for a given file
		/// </summary>
		/// <param name="Handle">The handle to a windows form</param>
		/// <param name="FileName">The file to show the property dialog for</param>
		/// <param name="VerbString">The verb to execute</param>
		public static int ShowProperties(IntPtr Handle, string FileName, string VerbString)
		{
			SHELLEXECUTEINFO SEI = new SHELLEXECUTEINFO();
			int iReturn;

			//set up the structure
			SEI.cbSize = Marshal.SizeOf(SEI);
			SEI.fMask = SEE_MASK_NOCLOSEPROCESS | SEE_MASK_INVOKEIDLIST | SEE_MASK_FLAG_NO_UI;
			SEI.hwnd = IntPtr.Zero;
			SEI.lpVerb = "properties";
			SEI.lpFile = FileName;
			SEI.lpParameters = "\0";
			SEI.lpDirectory = "\0";
			SEI.nShow = 0;
			SEI.hInstApp = 0;
			SEI.lpIDList = 0;

			//and call the exec api
			iReturn = ShellExecuteEx(SEI);

			return iReturn;
		}
		/// <summary>
		/// Shows the Windows Explorer Properties dialog for a given file
		/// </summary>
		/// <param name="Handle">The handle to a windows form</param>
		/// <param name="FileName">The file to show the property dialog for</param>
		public static int ShowProperties(IntPtr Handle, string FileName)
		{
			return ShowProperties(Handle, FileName, "properties");
		}

		#region Required constants
		/// <summary>
		/// 
		/// </summary>
		public const int SEE_MASK_INVOKEIDLIST = 0xC;
		/// <summary>
		/// 
		/// </summary>
		public const int SEE_MASK_NOCLOSEPROCESS = 0x40;
		/// <summary>
		/// 
		/// </summary>
		public const int SEE_MASK_FLAG_NO_UI = 0x400;
		#endregion

		#region Native Methods
		/// <summary>
		/// Executes a file from the Shell
		/// </summary>
		/// <param name="SEI"></param>
		/// <returns></returns>
		[DllImport("shell32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
		public static extern int ShellExecuteEx(SHELLEXECUTEINFO SEI);
		#endregion

		#region SHELLEXECUTEINFO
		/// <summary>
		/// SHELLEXECUTEINFO
		/// </summary>
		[StructLayout(LayoutKind.Sequential)]
		public class SHELLEXECUTEINFO
		{
			/// <summary>
			/// cbSize
			/// </summary>
			public int cbSize;
			/// <summary>
			/// Masking
			/// </summary>
			public int fMask;
			/// <summary>
			/// Handle
			/// </summary>
			public IntPtr hwnd;
			/// <summary>
			/// Verb
			/// </summary>
			[MarshalAs(UnmanagedType.LPWStr)]
			public string lpVerb;
			/// <summary>
			/// File
			/// </summary>
			[MarshalAs(UnmanagedType.LPWStr)]
			public string lpFile;
			/// <summary>
			/// Parameters
			/// </summary>
			[MarshalAs(UnmanagedType.LPWStr)]
			public string lpParameters;
			/// <summary>
			/// Folder
			/// </summary>
			[MarshalAs(UnmanagedType.LPWStr)]
			public string lpDirectory;
			/// <summary>
			/// Show window
			/// </summary>
			public int nShow;
			/// <summary>
			/// instantiate app
			/// </summary>
			public int hInstApp;
			/// <summary>
			/// List
			/// </summary>
			public int lpIDList;
			/// <summary>
			/// Class
			/// </summary>
			public string lpClass;
			/// <summary>
			/// Key
			/// </summary>
			public int hkeyClass;
			/// <summary>
			/// Hotkey
			/// </summary>
			public int dwHotKey;
			/// <summary>
			/// Icon
			/// </summary>
			public int hIcon;
			/// <summary>
			/// ProcessID
			/// </summary>
			public int hProcess;
		}
		#endregion

		#region RECT
		/// <summary>
		/// Win32 RECT
		/// </summary>
		[StructLayout(LayoutKind.Sequential)]
		public struct RECT
		{
			/// <summary>
			/// left
			/// </summary>
			public int left;
			/// <summary>
			/// top
			/// </summary>
			public int top;
			/// <summary>
			/// right
			/// </summary>
			public int right;
			/// <summary>
			/// bottom
			/// </summary>
			public int bottom;
		}
		#endregion

		#region Remove

		//#region NMHDR
		///// <summary>
		///// Base notify message header
		///// </summary>
		//[StructLayout(LayoutKind.Sequential)]
		//public struct NMHDR
		//{
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public IntPtr hwndFrom;
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public int idFrom;
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public int code;
		//}
		//#endregion

		//#region NMHEADER
		///// <summary>
		///// Standard notify message header
		///// </summary>
		//[StructLayout(LayoutKind.Sequential)]
		//public struct NMHEADER
		//{
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public NMHDR hdr;
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public int iItem;
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public int iButton;
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public IntPtr pitem;
		//}
		//#endregion

		//#region NMLVCUSTOMDRAW
		///// <summary>
		///// ListView specialized custom draw message 
		///// </summary>
		//[StructLayout(LayoutKind.Sequential)]
		//public struct NMLVCUSTOMDRAW
		//{
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public NMCUSTOMDRAW nmcd;
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public int clrText;
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public int clrTextBk;
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public int iSubItem;
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    [System.CLSCompliant(false)]
		//    public uint dwItemType;
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public int clrFace;
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public int iIconEffect;
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public int iIconPhase;
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public int iPartId;
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public int iStateId;
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public RECT rcText;
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    [System.CLSCompliant(false)]
		//    public uint uAlign;
		//}
		//#endregion

		//#region NMCUSTOMDRAW
		///// <summary>
		///// Custom draw notify message
		///// </summary>
		//[StructLayout(LayoutKind.Sequential)]
		//public struct NMCUSTOMDRAW
		//{
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public NMHDR hdr;
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public int dwDrawStage;
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public IntPtr hdc;
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public RECT rc;
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public int dwItemSpec;
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public int uItemState;
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    public IntPtr lItemlParam;
		//}
		//#endregion

		//#region W32_CDDS
		///// <summary>
		///// Custom draw draw stage values
		///// </summary>
		//public enum W32_CDDS : int
		//{
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDDS_PREPAINT = 0x00000001,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDDS_POSTPAINT = 0x00000002,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDDS_PREERASE = 0x00000003,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDDS_POSTERASE = 0x00000004,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDDS_ITEM = 0x00010000,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDDS_ITEMPREPAINT = (CDDS_ITEM | CDDS_PREPAINT),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDDS_ITEMPOSTPAINT = (CDDS_ITEM | CDDS_POSTPAINT),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDDS_ITEMPREERASE = (CDDS_ITEM | CDDS_PREERASE),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDDS_ITEMPOSTERASE = (CDDS_ITEM | CDDS_POSTERASE),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDDS_SUBITEM = 0x00020000,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDDS_SUBITEMPREPAINT = (CDDS_SUBITEM | CDDS_ITEMPREPAINT),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDDS_SUBITEMPOSTPAINT = (CDDS_SUBITEM | CDDS_ITEMPOSTPAINT),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDDS_SUBITEMPREERASE = (CDDS_SUBITEM | CDDS_ITEMPREERASE),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDDS_SUBITEMPOSTERASE = (CDDS_SUBITEM | CDDS_ITEMPOSTERASE),
		//}
		//#endregion

		//#region W32_CDIS
		///// <summary>
		///// Custom draw state information
		///// </summary>
		//public enum W32_CDIS : int
		//{
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDIS_SELECTED = 0x0001,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDIS_GRAYED = 0x0002,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDIS_DISABLED = 0x0004,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDIS_CHECKED = 0x0008,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDIS_FOCUS = 0x0010,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDIS_DEFAULT = 0x0020,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDIS_HOT = 0x0040,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDIS_MARKED = 0x0080,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDIS_INDETERMINATE = 0x0100,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDIS_SHOWKEYBOARDCUES = 0x0200
		//}
		//#endregion

		//#region W32_CDRF
		///// <summary>
		///// Custom draw return values
		///// </summary>
		//public enum W32_CDRF : int
		//{
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDRF_DODEFAULT = 0x0000,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDRF_NEWFONT = 0x0002,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDRF_SKIPDEFAULT = 0x0004,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDRF_NOTIFYPOSTPAINT = 0x0010,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDRF_NOTIFYITEMDRAW = 0x0020,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDRF_NOTIFYSUBITEMDRAW = 0x0020,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CDRF_NOTIFYPOSTERASE = 0x0040
		//}
		//#endregion

		//#region W32_OCM
		///// <summary>
		///// Reflected message codes OCM_
		///// </summary>
		//public enum W32_OCM : int
		//{
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    OCM__BASE = W32_WM.WM_REFLECT,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    OCM_COMMAND = (OCM__BASE + W32_WM.WM_COMMAND),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    OCM_CTLCOLORBTN = (OCM__BASE + W32_WM.WM_CTLCOLORBTN),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    OCM_CTLCOLOREDIT = (OCM__BASE + W32_WM.WM_CTLCOLOREDIT),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    OCM_CTLCOLORDLG = (OCM__BASE + W32_WM.WM_CTLCOLORDLG),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    OCM_CTLCOLORLISTBOX = (OCM__BASE + W32_WM.WM_CTLCOLORLISTBOX),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    OCM_CTLCOLORMSGBOX = (OCM__BASE + W32_WM.WM_CTLCOLORMSGBOX),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    OCM_CTLCOLORSCROLLBAR = (OCM__BASE + W32_WM.WM_CTLCOLORSCROLLBAR),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    OCM_CTLCOLORSTATIC = (OCM__BASE + W32_WM.WM_CTLCOLORSTATIC),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    OCM_CTLCOLOR = (OCM__BASE + W32_WM.WM_CTLCOLOR),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    OCM_DRAWITEM = (OCM__BASE + W32_WM.WM_DRAWITEM),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    OCM_MEASUREITEM = (OCM__BASE + W32_WM.WM_MEASUREITEM),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    OCM_DELETEITEM = (OCM__BASE + W32_WM.WM_DELETEITEM),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    OCM_VKEYTOITEM = (OCM__BASE + W32_WM.WM_VKEYTOITEM),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    OCM_CHARTOITEM = (OCM__BASE + W32_WM.WM_CHARTOITEM),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    OCM_COMPAREITEM = (OCM__BASE + W32_WM.WM_COMPAREITEM),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    OCM_HSCROLL = (OCM__BASE + W32_WM.WM_HSCROLL),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    OCM_VSCROLL = (OCM__BASE + W32_WM.WM_VSCROLL),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    OCM_PARENTNOTIFY = (OCM__BASE + W32_WM.WM_PARENTNOTIFY),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    OCM_NOTIFY = (OCM__BASE + W32_WM.WM_NOTIFY)
		//}
		//#endregion

		//#region W32_NM
		///// <summary>
		///// Notify message codes NM_
		///// </summary>
		//public enum W32_NM : int
		//{
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    NM_FIRST = BaseCodes.NM_FIRST,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    NM_OUTOFMEMORY = (NM_FIRST - 1),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    NM_CLICK = (NM_FIRST - 2),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    NM_DBLCLK = (NM_FIRST - 3),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    NM_RETURN = (NM_FIRST - 4),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    NM_RCLICK = (NM_FIRST - 5),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    NM_RDBLCLK = (NM_FIRST - 6),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    NM_SETFOCUS = (NM_FIRST - 7),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    NM_KILLFOCUS = (NM_FIRST - 8),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    NM_CUSTOMDRAW = (NM_FIRST - 12),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    NM_HOVER = (NM_FIRST - 13),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    NM_NCHITTEST = (NM_FIRST - 14),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    NM_KEYDOWN = (NM_FIRST - 15),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    NM_RELEASEDCAPTURE = (NM_FIRST - 16),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    NM_SETCURSOR = (NM_FIRST - 17),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    NM_CHAR = (NM_FIRST - 18),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    NM_TOOLTIPSCREATED = (NM_FIRST - 19),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    NM_LDOWN = (NM_FIRST - 20),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    NM_RDOWN = (NM_FIRST - 21),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    NM_THEMECHANGED = (NM_FIRST - 22)
		//}
		//#endregion

		//#region W32_WM
		///// <summary>
		///// Windows message codes WM_
		///// </summary>
		//public enum W32_WM : int
		//{
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_NULL = 0x0000,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_CREATE = 0x0001,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_DESTROY = 0x0002,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MOVE = 0x0003,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_SIZE = 0x0005,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_ACTIVATE = 0x0006,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_SETFOCUS = 0x0007,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_KILLFOCUS = 0x0008,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_ENABLE = 0x000A,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_SETREDRAW = 0x000B,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_SETTEXT = 0x000C,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_GETTEXT = 0x000D,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_GETTEXTLENGTH = 0x000E,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_PAINT = 0x000F,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_CLOSE = 0x0010,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_QUERYENDSESSION = 0x0011,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_QUIT = 0x0012,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_QUERYOPEN = 0x0013,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_ERASEBKGND = 0x0014,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_SYSCOLORCHANGE = 0x0015,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_ENDSESSION = 0x0016,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_SHOWWINDOW = 0x0018,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_CTLCOLOR = 0x0019,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_WININICHANGE = 0x001A,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_SETTINGCHANGE = 0x001A,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_DEVMODECHANGE = 0x001B,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_ACTIVATEAPP = 0x001C,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_FONTCHANGE = 0x001D,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_TIMECHANGE = 0x001E,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_CANCELMODE = 0x001F,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_SETCURSOR = 0x0020,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MOUSEACTIVATE = 0x0021,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_CHILDACTIVATE = 0x0022,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_QUEUESYNC = 0x0023,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_GETMINMAXINFO = 0x0024,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_PAINTICON = 0x0026,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_ICONERASEBKGND = 0x0027,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_NEXTDLGCTL = 0x0028,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_SPOOLERSTATUS = 0x002A,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_DRAWITEM = 0x002B,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MEASUREITEM = 0x002C,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_DELETEITEM = 0x002D,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_VKEYTOITEM = 0x002E,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_CHARTOITEM = 0x002F,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_SETFONT = 0x0030,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_GETFONT = 0x0031,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_SETHOTKEY = 0x0032,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_GETHOTKEY = 0x0033,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_QUERYDRAGICON = 0x0037,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_COMPAREITEM = 0x0039,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_GETOBJECT = 0x003D,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_COMPACTING = 0x0041,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_COMMNOTIFY = 0x0044,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_WINDOWPOSCHANGING = 0x0046,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_WINDOWPOSCHANGED = 0x0047,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_POWER = 0x0048,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_COPYDATA = 0x004A,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_CANCELJOURNAL = 0x004B,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_NOTIFY = 0x004E,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_INPUTLANGCHANGEREQUEST = 0x0050,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_INPUTLANGCHANGE = 0x0051,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_TCARD = 0x0052,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_HELP = 0x0053,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_USERCHANGED = 0x0054,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_NOTIFYFORMAT = 0x0055,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_CONTEXTMENU = 0x007B,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_STYLECHANGING = 0x007C,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_STYLECHANGED = 0x007D,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_DISPLAYCHANGE = 0x007E,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_GETICON = 0x007F,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_SETICON = 0x0080,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_NCCREATE = 0x0081,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_NCDESTROY = 0x0082,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_NCCALCSIZE = 0x0083,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_NCHITTEST = 0x0084,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_NCPAINT = 0x0085,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_NCACTIVATE = 0x0086,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_GETDLGCODE = 0x0087,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_SYNCPAINT = 0x0088,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_NCMOUSEMOVE = 0x00A0,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_NCLBUTTONDOWN = 0x00A1,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_NCLBUTTONUP = 0x00A2,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_NCLBUTTONDBLCLK = 0x00A3,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_NCRBUTTONDOWN = 0x00A4,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_NCRBUTTONUP = 0x00A5,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_NCRBUTTONDBLCLK = 0x00A6,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_NCMBUTTONDOWN = 0x00A7,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_NCMBUTTONUP = 0x00A8,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_NCMBUTTONDBLCLK = 0x00A9,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_KEYDOWN = 0x0100,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_KEYUP = 0x0101,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_CHAR = 0x0102,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_DEADCHAR = 0x0103,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_SYSKEYDOWN = 0x0104,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_SYSKEYUP = 0x0105,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_SYSCHAR = 0x0106,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_SYSDEADCHAR = 0x0107,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_KEYLAST = 0x0108,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_IME_STARTCOMPOSITION = 0x010D,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_IME_ENDCOMPOSITION = 0x010E,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_IME_COMPOSITION = 0x010F,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_IME_KEYLAST = 0x010F,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_INITDIALOG = 0x0110,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_COMMAND = 0x0111,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_SYSCOMMAND = 0x0112,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_TIMER = 0x0113,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_HSCROLL = 0x0114,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_VSCROLL = 0x0115,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_INITMENU = 0x0116,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_INITMENUPOPUP = 0x0117,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MENUSELECT = 0x011F,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MENUCHAR = 0x0120,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_ENTERIDLE = 0x0121,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MENURBUTTONUP = 0x0122,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MENUDRAG = 0x0123,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MENUGETOBJECT = 0x0124,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_UNINITMENUPOPUP = 0x0125,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MENUCOMMAND = 0x0126,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_CTLCOLORMSGBOX = 0x0132,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_CTLCOLOREDIT = 0x0133,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_CTLCOLORLISTBOX = 0x0134,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_CTLCOLORBTN = 0x0135,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_CTLCOLORDLG = 0x0136,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_CTLCOLORSCROLLBAR = 0x0137,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_CTLCOLORSTATIC = 0x0138,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MOUSEMOVE = 0x0200,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_LBUTTONDOWN = 0x0201,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_LBUTTONUP = 0x0202,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_LBUTTONDBLCLK = 0x0203,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_RBUTTONDOWN = 0x0204,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_RBUTTONUP = 0x0205,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_RBUTTONDBLCLK = 0x0206,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MBUTTONDOWN = 0x0207,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MBUTTONUP = 0x0208,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MBUTTONDBLCLK = 0x0209,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MOUSEWHEEL = 0x020A,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_PARENTNOTIFY = 0x0210,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_ENTERMENULOOP = 0x0211,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_EXITMENULOOP = 0x0212,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_NEXTMENU = 0x0213,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_SIZING = 0x0214,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_CAPTURECHANGED = 0x0215,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MOVING = 0x0216,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_DEVICECHANGE = 0x0219,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MDICREATE = 0x0220,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MDIDESTROY = 0x0221,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MDIACTIVATE = 0x0222,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MDIRESTORE = 0x0223,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MDINEXT = 0x0224,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MDIMAXIMIZE = 0x0225,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MDITILE = 0x0226,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MDICASCADE = 0x0227,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MDIICONARRANGE = 0x0228,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MDIGETACTIVE = 0x0229,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MDISETMENU = 0x0230,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_ENTERSIZEMOVE = 0x0231,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_EXITSIZEMOVE = 0x0232,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_DROPFILES = 0x0233,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MDIREFRESHMENU = 0x0234,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_IME_SETCONTEXT = 0x0281,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_IME_NOTIFY = 0x0282,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_IME_CONTROL = 0x0283,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_IME_COMPOSITIONFULL = 0x0284,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_IME_SELECT = 0x0285,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_IME_CHAR = 0x0286,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_IME_REQUEST = 0x0288,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_IME_KEYDOWN = 0x0290,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_IME_KEYUP = 0x0291,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MOUSEHOVER = 0x02A1,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_MOUSELEAVE = 0x02A3,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_CUT = 0x0300,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_COPY = 0x0301,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_PASTE = 0x0302,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_CLEAR = 0x0303,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_UNDO = 0x0304,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_RENDERFORMAT = 0x0305,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_RENDERALLFORMATS = 0x0306,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_DESTROYCLIPBOARD = 0x0307,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_DRAWCLIPBOARD = 0x0308,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_PAINTCLIPBOARD = 0x0309,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_VSCROLLCLIPBOARD = 0x030A,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_SIZECLIPBOARD = 0x030B,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_ASKCBFORMATNAME = 0x030C,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_CHANGECBCHAIN = 0x030D,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_HSCROLLCLIPBOARD = 0x030E,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_QUERYNEWPALETTE = 0x030F,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_PALETTEISCHANGING = 0x0310,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_PALETTECHANGED = 0x0311,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_HOTKEY = 0x0312,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_PRINT = 0x0317,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_PRINTCLIENT = 0x0318,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_HANDHELDFIRST = 0x0358,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_HANDHELDLAST = 0x035F,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_AFXFIRST = 0x0360,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_AFXLAST = 0x037F,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_PENWINFIRST = 0x0380,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_PENWINLAST = 0x038F,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_APP = 0x8000,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_USER = 0x0400,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    WM_REFLECT = WM_USER + 0x1c00
		//}
		//#endregion

		//#region W32_HDN
		///// <summary>
		///// Header notification message codes HDN_
		///// </summary>
		//public enum W32_HDN : int
		//{
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_FIRST = BaseCodes.HDN_FIRST,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_ITEMCHANGINGA = (HDN_FIRST - 0),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_ITEMCHANGINGW = (HDN_FIRST - 20),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_ITEMCHANGEDA = (HDN_FIRST - 1),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_ITEMCHANGEDW = (HDN_FIRST - 21),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_ITEMCLICKA = (HDN_FIRST - 2),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_ITEMCLICKW = (HDN_FIRST - 22),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_ITEMDBLCLICKA = (HDN_FIRST - 3),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_ITEMDBLCLICKW = (HDN_FIRST - 23),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_DIVIDERDBLCLICKA = (HDN_FIRST - 5),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_DIVIDERDBLCLICKW = (HDN_FIRST - 25),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_BEGINTRACKA = (HDN_FIRST - 6),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_BEGINTRACKW = (HDN_FIRST - 26),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_ENDTRACKA = (HDN_FIRST - 7),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_ENDTRACKW = (HDN_FIRST - 27),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_TRACKA = (HDN_FIRST - 8),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_TRACKW = (HDN_FIRST - 28),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_GETDISPINFOA = (HDN_FIRST - 9),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_GETDISPINFOW = (HDN_FIRST - 29),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_BEGINDRAG = (HDN_FIRST - 10),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_ENDDRAG = (HDN_FIRST - 11),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_FILTERCHANGE = (HDN_FIRST - 12),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_FILTERBTNCLICK = (HDN_FIRST - 13)
		//}
		//#endregion

		//#region BaseCodes
		///// <summary>
		///// First message codes for sub message groups
		///// </summary>
		//public enum BaseCodes : int
		//{
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    LVM_FIRST = 0x1000,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    TV_FIRST = 0x1100,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDM_FIRST = 0x1200,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    TCM_FIRST = 0x1300,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    PGM_FIRST = 0x1400,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    ECM_FIRST = 0x1500,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    BCM_FIRST = 0x1600,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CBM_FIRST = 0x1700,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    CCM_FIRST = 0x2000,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    NM_FIRST = 0x0000,
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    LVN_FIRST = (NM_FIRST - 100),
		//    /// <summary>
		//    /// 
		//    /// </summary>
		//    HDN_FIRST = (NM_FIRST - 300),
		//}
		//#endregion

		#endregion

	}
	#endregion
}